import VueRouter from 'vue-router';
import Vue from 'vue';
import Home from '../views/home/home';

Vue.use(VueRouter);

const routes = [
  {
    name: 'home',
    path: '/',
    component: Home
  },
  {
    path: '*',
    redirect: '/'
  }
];

export default new VueRouter({
  routes,
  strict: process.env.NODE_ENV !== 'production',
  scrollBehavior (to, from, savedPosition) {
    if (savedPosition) {
      return savedPosition;
    } else {
      return { x: 0, y: 0 };
    }
  }
});
